package cn.tedu.pojo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class School {
    private String name ="清华大学";
    private int schoolnum = 5;
    @Autowired
    private Student student;
    @Autowired
    private Teacher teacher;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSchoolnum() {
        return schoolnum;
    }

    public void setSchoolnum(int schoolnum) {
        this.schoolnum = schoolnum;
    }

    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    @Override
    public String toString() {
        return "School{" +
                "name='" + name + '\'' +
                ", schoolnum=" + schoolnum +
                ", student=" + student +
                ", teacher=" + teacher +
                '}';
    }
}
